import Vue from 'vue';
import App from './App';
import store from './store/index.js';
import pendingObj from './util/pendingObj.js'
import myTimer from './util/myTimer.js'


// main.js引入uView库
import uView from 'uview-ui';
import { ONLINE_SERVER_ADDRESS_BASE, uniRequestP, tokenRequestP} from '@/util/network';
import {
	exitLogin,
	rolename,
} from '@/util/funcs';
import {
	tips
} from '@/util/misc';

Vue.config.productionTip = false;
App.mpType = 'app';

Vue.use(uView);
Vue.prototype.$http = ONLINE_SERVER_ADDRESS_BASE;
Vue.prototype.$uniRequest = uniRequestP;
Vue.prototype.$tokenRequest = tokenRequestP;
Vue.prototype.$logout = exitLogin;
Vue.prototype.$tips = tips;
Vue.prototype.$pendingObj = pendingObj;
Vue.prototype.$myTimer = myTimer;

export const appMain = new Vue({
  ...App,
  store,
});
appMain.$mount();
